package com.xujc.controller;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by xujc on 6/21/15.
 */
public class DologoutAction extends ActionSupport {
    @Override
    public String execute() throws Exception {
        HttpServletResponse response = ServletActionContext.getResponse();
        Cookie cookie = new Cookie("uid","0");
        cookie.setMaxAge(0);
        response.addCookie(cookie);
        return SUCCESS;
    }
}
